﻿using System;
using System;
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Text;
using netDxf;
using netDxf.Blocks;
using netDxf.Collections;
using netDxf.Entities;
using netDxf.Header;
using netDxf.Objects;
using netDxf.Tables;
using netDxf.Units;
using Attribute = netDxf.Entities.Attribute;
using Image = netDxf.Entities.Image;
using Point = netDxf.Entities.Point;
using Trace = netDxf.Entities.Trace;
using System.Threading;

namespace TestDxfDocument
{

    class Shellfacemillingcutter3
    {
        public static void _Shellfacemillingcutter3(Dictionary<string, Object> data)//细柄丝锥
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            refin.Linetype = Linetype.Dashed;
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            centre.Linetype = Linetype.DashDot;
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层

            //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);


            double scale = 1; //放大系数

            double a = 40;
            double b = 90;
            double c = 14;
            double d1 = 9;
            double d2 = 28;
            double d3 = 29;
            double d4 = 20;
            double d5 = 56;
            double D = 160;
            double H = 63;
            double kr = 75;
            double d6 = 16.4;
            double e = 105;

            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + H + 6, v1.Y);
            Vector2 v3 = new Vector2(v1.X + 3, v1.Y);
            Vector2 v32 = new Vector2(v3.X + H, v3.Y + D / 2);
            Vector2 v33 = fun.Polar(v32, (90 + kr) * pi / 180, H / 5.27);
            Vector2 v4 = new Vector2(v3.X, v33.Y - 4);
            Vector2 v5 = new Vector2(v33.X, v4.Y);
            Vector2 v6 = fun.Polar(v5, (kr - 90) * pi / 180, H / 5.27 / 3);
            Vector2 v7 = new Vector2(v6.X, v6.Y * -1);
            Vector2 v8 = new Vector2(v5.X, v5.Y * -1);
            Vector2 v9 = new Vector2(v4.X, v4.Y * -1);
            Vector2 v10 = new Vector2(v3.X, v3.Y + Math.Pow((a / 2 * a / 2) - (d6 / 2 * d6 / 2), 0.5));
            Vector2 v11 = new Vector2(v10.X + d1, v10.Y);
            Vector2 v12 = new Vector2(v11.X, v1.Y + e / 2);
            Vector2 v13 = new Vector2(v10.X, v12.Y);
            Vector2 v14 = new Vector2(v11.X, v1.Y + a / 2);
            Vector2 v15 = new Vector2(v3.X + d3, v14.Y);
            Vector2 v16 = new Vector2(v15.X, v3.Y + d5 / 2);
            Vector2 v17 = new Vector2(v16.X, v16.Y * - 1);
            Vector2 v18 = new Vector2(v6.X - H / 5.59, v16.Y);
            Vector2 v19 = new Vector2(v18.X, v18.Y * -1);
            Vector2 v20 = new Vector2(v3.X, v14.Y * -1);
            Vector2 v21 = new Vector2(v15.X, v20.Y);
            Vector2 v22 = new Vector2(v21.X, v21.Y - 3);
            Vector2 v23 = new Vector2(v3.X + d2, v22.Y);
            Vector2 v24 = new Vector2(v23.X, v23.Y - d4);
            Vector2 v25 = new Vector2(v18.X, v24.Y);
            Vector2 v26 = new Vector2(v23.X, v23.Y - (d4 - c) / 2);
            Vector2 v27 = new Vector2(v3.X, v26.Y);
            Vector2 v28 = new Vector2(v27.X, v27.Y - c);
            Vector2 v29 = new Vector2(v26.X, v28.Y);
            Vector2 v30 = new Vector2(v18.X, v6.Y - H / 4.628);
            Vector2 v31 = new Vector2(v30.X, v30.Y * -1);
            Vector2 v34 = new Vector2(v32.X, v32.Y - H / 11.63);
            Vector2 v35 = new Vector2(v6.X + 2, v34.Y - H / 14.54);
            Vector2 v36 = new Vector2(v32.X, v32.Y * -1);
            Vector2 v37 = new Vector2(v33.X, v33.Y * -1);
            Vector2 v38 = new Vector2(v34.X, v34.Y * -1);
            Vector2 v39 = new Vector2(v35.X, v35.Y * -1);
            Vector2 v40 = new Vector2(v6.X, v6.Y - 3);
            Vector2 v41 = new Vector2(v40.X, v40.Y * -1);
            Vector2 v42 = new Vector2(v13.X, v3.X + b / 2);
            Vector2 v43 = new Vector2(v42.X + 2, v42.Y + 2);
            Vector2 v44 = new Vector2(v43.X, v4.Y);
            Vector2 v45 = new Vector2(v27.X - 3, v27.Y - c / 2);
            Vector2 v46 = new Vector2(v19.X + 2, v45.Y);
            Vector2 v74 = new Vector2(v28.X, v28.Y - 3);
            Vector2 v47 = new Vector2(v74.X + 2, v74.Y - 2);
            Vector2 v48 = new Vector2(v9.X + 2, v9.Y + 2);
            Vector2 v49 = new Vector2(v25.X, v25.Y - 3);
            Vector2 v50 = new Vector2(v24.X, v49.Y);
            Vector2 v51 = new Vector2(v50.X, v50.Y * -1);
            Vector2 v52 = new Vector2(v49.X, v51.Y);

            Vector2 v53 = new Vector2(v2.X + D , v2.Y);
            Vector2 v54 = new Vector2(v53.X - D / 2 - 3, v53.Y);
            Vector2 v55 = new Vector2(v53.X + D / 2 + 3, v53.Y);
            Vector2 v56 = new Vector2(v53.X, v53.Y + D / 2 + 6);
            Vector2 v57 = new Vector2(v53.X, v53.Y - D / 2 - 6);
            Vector2 v58 = fun.Polar(v53, 135 * pi / 180, D / 2 + 6);
            Vector2 v59 = fun.Polar(v53, -45 * pi / 180, D / 2 + 6);
            Vector2 v60 = fun.Polar(v53, 45 * pi / 180, e / 2 + 3);
            Vector2 v61 = fun.Polar(v53, -135 * pi / 180, e + 3);
            Vector2 v62 = new Vector2(v53.X - d6 / 2, v11.Y);
            Vector2 v63 = new Vector2(v62.X, v12.Y - 4);
            Vector2 v64 = new Vector2(v63.X + d6, v63.Y);
            Vector2 v65 = new Vector2(v64.X, v62.Y);
            Vector2 v66 = new Vector2(v65.X, v65.Y * -1);
            Vector2 v67 = new Vector2(v64.X, v64.Y * -1);
            Vector2 v68 = new Vector2(v63.X, v63.Y * -1);
            Vector2 v69 = new Vector2(v62.X, v62.Y * -1);
            Vector2 v70 = fun.Polar(v53, 135 * pi / 180, D / 4.61);
            Vector2 v71 = fun.Polar(v53, 45 * pi / 180, D / 4.61);
            Vector2 v72 = new Vector2(v71.X, v71.Y * -1);
            Vector2 v73 = new Vector2(v70.X, v72.Y);
            Vector2 v75 = new Vector2(v53.X, v12.Y);
            Vector2 v76 = new Vector2(v53.X, v75.Y * -1);





            //作图
            Line line1 = new Line(v1, v2);
            line1.Layer = centre;
            line1.Linetype = Linetype.DashDot;
            line1.LinetypeScale = 3;
            dxf.AddEntity(line1);

            LwPolyline line2 = new LwPolyline();
            line2.Vertexes.Add(new LwPolylineVertex(v4));
            line2.Vertexes.Add(new LwPolylineVertex(v5));
            line2.Vertexes.Add(new LwPolylineVertex(v6));
            line2.Vertexes.Add(new LwPolylineVertex(v7));
            line2.Vertexes.Add(new LwPolylineVertex(v8));
            line2.Vertexes.Add(new LwPolylineVertex(v9));
            line2.Vertexes.Add(new LwPolylineVertex(v4));
            fun.PolyFill(dxf, line2, 0.3, contour);

            LwPolyline line3 = new LwPolyline();
            line3.Vertexes.Add(new LwPolylineVertex(v13));
            line3.Vertexes.Add(new LwPolylineVertex(v12));
            line3.Vertexes.Add(new LwPolylineVertex(v11));
            line3.Vertexes.Add(new LwPolylineVertex(v10));
            fun.PolyFill(dxf, line3, 0.3, contour);

            LwPolyline line4 = new LwPolyline();
            line4.Vertexes.Add(new LwPolylineVertex(v14));
            line4.Vertexes.Add(new LwPolylineVertex(v15));
            line4.Vertexes.Add(new LwPolylineVertex(v21));
            line4.Vertexes.Add(new LwPolylineVertex(v20));
            fun.PolyFill(dxf, line4, 0.3, contour);

            LwPolyline line5 = new LwPolyline();
            line5.Vertexes.Add(new LwPolylineVertex(v18));
            line5.Vertexes.Add(new LwPolylineVertex(v16));
            line5.Vertexes.Add(new LwPolylineVertex(v17));
            line5.Vertexes.Add(new LwPolylineVertex(v19));
            fun.PolyFill(dxf, line5, 0.3, contour);

            LwPolyline line6 = new LwPolyline();
            line6.Vertexes.Add(new LwPolylineVertex(v22));
            line6.Vertexes.Add(new LwPolylineVertex(v23));
            line6.Vertexes.Add(new LwPolylineVertex(v24));
            line6.Vertexes.Add(new LwPolylineVertex(v25));
            fun.PolyFill(dxf, line6, 0.3, contour);

            LwPolyline line7 = new LwPolyline();
            line7.Vertexes.Add(new LwPolylineVertex(v27));
            line7.Vertexes.Add(new LwPolylineVertex(v26));
            line7.Vertexes.Add(new LwPolylineVertex(v29));
            line7.Vertexes.Add(new LwPolylineVertex(v28));
            fun.PolyFill(dxf, line7, 0.3, contour);

            LwPolyline line8 = new LwPolyline();
            line8.Vertexes.Add(new LwPolylineVertex(v40));
            line8.Vertexes.Add(new LwPolylineVertex(v30));
            line8.Vertexes.Add(new LwPolylineVertex(v31));
            line8.Vertexes.Add(new LwPolylineVertex(v41));
            fun.PolyFill(dxf, line8, 0.3, contour);

            LwPolyline line9 = new LwPolyline();
            line9.Vertexes.Add(new LwPolylineVertex(v33));
            line9.Vertexes.Add(new LwPolylineVertex(v32));
            line9.Vertexes.Add(new LwPolylineVertex(v34));
            line9.Vertexes.Add(new LwPolylineVertex(v35));
            fun.PolyFill(dxf, line9, 0.3, contour);

            LwPolyline line10 = new LwPolyline();
            line10.Vertexes.Add(new LwPolylineVertex(v39));
            line10.Vertexes.Add(new LwPolylineVertex(v38));
            line10.Vertexes.Add(new LwPolylineVertex(v36));
            line10.Vertexes.Add(new LwPolylineVertex(v37));
            fun.PolyFill(dxf, line10, 0.3, contour);

            Line line11 = new Line(v44, v43);
            line11.Layer = centre;
            line11.Linetype = Linetype.DashDot;
            line11.LinetypeScale = 3;
            dxf.AddEntity(line11);

            Line line12 = new Line(v42, v43);
            line12.Layer = centre;
            line12.Linetype = Linetype.DashDot;
            line12.LinetypeScale = 3;
            dxf.AddEntity(line12);

            Line line13 = new Line(v28, v47);
            line13.Layer = centre;
            line13.Linetype = Linetype.DashDot;
            line13.LinetypeScale = 3;
            dxf.AddEntity(line13);

            Line line14 = new Line(v47, v48);
            line14.Layer = centre;
            line14.Linetype = Linetype.DashDot;
            line14.LinetypeScale = 3;
            dxf.AddEntity(line14);

            Line line15 = new Line(v48, v47);
            line15.Layer = centre;
            line15.Linetype = Linetype.DashDot;
            line15.LinetypeScale = 3;
            dxf.AddEntity(line15);

            Line line16 = new Line(v9, v48);
            line16.Layer = centre;
            line16.Linetype = Linetype.DashDot;
            line16.LinetypeScale = 3;
            dxf.AddEntity(line16);

            Line line17 = new Line(v49, v50);
            line17.Layer = centre;
            line17.Linetype = Linetype.DashDot;
            line17.LinetypeScale = 3;
            dxf.AddEntity(line17);

            Line line18 = new Line(v50, v51);
            line18.Layer = centre;
            line18.Linetype = Linetype.DashDot;
            line18.LinetypeScale = 3;
            dxf.AddEntity(line18);

            Line line19 = new Line(v52, v51);
            line19.Layer = centre;
            line19.Linetype = Linetype.DashDot;
            line19.LinetypeScale = 3;
            dxf.AddEntity(line19);

            Line line20 = new Line(v54, v55);
            line20.Layer = centre;
            line20.Linetype = Linetype.DashDot;
            line20.LinetypeScale = 3;
            dxf.AddEntity(line20);

            Line line21 = new Line(v56, v57);
            line21.Layer = centre;
            line21.Linetype = Linetype.DashDot;
            line21.LinetypeScale = 3;
            dxf.AddEntity(line21);

            Line line22 = new Line(v58, v59);
            line22.Layer = centre;
            line22.Linetype = Linetype.DashDot;
            line22.LinetypeScale = 3;
            dxf.AddEntity(line22);

            Line line23 = new Line(v60, v61);
            line23.Layer = centre;
            line23.Linetype = Linetype.DashDot;
            line23.LinetypeScale = 3;
            dxf.AddEntity(line23);

            LwPolyline line24 = new LwPolyline();
            line24.Vertexes.Add(new LwPolylineVertex(v62));
            line24.Vertexes.Add(new LwPolylineVertex(v63));
            line24.Vertexes.Add(new LwPolylineVertex(v75));
            line24.Vertexes.Add(new LwPolylineVertex(v64));
            line24.Vertexes.Add(new LwPolylineVertex(v65));
            line24.Vertexes[1].Bulge = Math.Tan(-51 * pi / 180 / 4);
            line24.Vertexes[2].Bulge = Math.Tan(-51 * pi / 180 / 4);
            fun.PolyFill(dxf, line24, 0.3, contour);

            LwPolyline line25 = new LwPolyline();
            line25.Vertexes.Add(new LwPolylineVertex(v66));
            line25.Vertexes.Add(new LwPolylineVertex(v67));
            line25.Vertexes.Add(new LwPolylineVertex(v76));
            line25.Vertexes.Add(new LwPolylineVertex(v68));
            line25.Vertexes.Add(new LwPolylineVertex(v69));
            line25.Vertexes[1].Bulge = Math.Tan(-51 * pi / 180 / 4);
            line25.Vertexes[2].Bulge = Math.Tan(-51 * pi / 180 / 4);
            fun.PolyFill(dxf, line25, 0.3, contour);

            fun.drawcircle(dxf, v53, a / 2, 0.3, contour);

            fun.drawcircle(dxf, v53, D / 2, 0.3, contour);

            fun.drawcircle(dxf, v70, c / 2, 0.3, contour);

            fun.drawcircle(dxf, v71, c / 2, 0.3, contour);

            fun.drawcircle(dxf, v72, c / 2, 0.3, contour);

            fun.drawcircle(dxf, v73, c / 2, 0.3, contour);

            fun.drawcircle(dxf, v53, Math.Pow(((v12.Y - 4) * (v12.Y - 4)) + (d6 / 2 * d6 / 2), 0.5), 0.3, centre);

            fun.drawcircle(dxf, v53, Math.Pow(((v70.Y - v53.Y) * (v70.Y - v53.Y)) + ((v70.X - v53.X) * (v70.X - v53.X)), 0.5), 0.3, centre);


            //填充
            LwPolyline hatchpoly1 = new LwPolyline();
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v4));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v5));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v6));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v40));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v30));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v18));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v16));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v15));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v14));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v12));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v13));
            hatchpoly1.Vertexes.Add(new LwPolylineVertex(v4));
            hatchpoly1.IsClosed = true;
            String[] htype1 = new String[100];
            Line[] hline1 = new Line[100];
            Arc[] harc1 = new Arc[100];
            int hnumst1 = hatchpoly1.Explode().Count;  //记录爆炸后，线段有多少
            for (int i = 0; i < hnumst1; i++)
            {
                htype1[i] = hatchpoly1.Explode()[i].Type.ToString();    //将所有的元素记录成一个数组
                if (htype1[i] == "Line")
                {
                    hline1[i] = (Line)hatchpoly1.Explode()[i];
                }
                if (htype1[i] == "Arc")
                {
                    harc1[i] = (Arc)hatchpoly1.Explode()[i];
                }
            }
            fun.hatchsub1(dxf, htype1, hnumst1, 45, 10, hline1, harc1, hatching);

            LwPolyline hatchpoly2 = new LwPolyline();
            hatchpoly2.Vertexes.Add(new LwPolylineVertex(v9));
            hatchpoly2.Vertexes.Add(new LwPolylineVertex(v8));
            hatchpoly2.Vertexes.Add(new LwPolylineVertex(v7));
            hatchpoly2.Vertexes.Add(new LwPolylineVertex(v41));
            hatchpoly2.Vertexes.Add(new LwPolylineVertex(v31));
            hatchpoly2.Vertexes.Add(new LwPolylineVertex(v25));
            hatchpoly2.Vertexes.Add(new LwPolylineVertex(v24));
            hatchpoly2.Vertexes.Add(new LwPolylineVertex(v29));
            hatchpoly2.Vertexes.Add(new LwPolylineVertex(v28));
            hatchpoly2.Vertexes.Add(new LwPolylineVertex(v9));
            hatchpoly2.IsClosed = true;
            String[] htype2 = new String[100];
            Line[] hline2 = new Line[100];
            Arc[] harc2 = new Arc[100];
            int hnumst2 = hatchpoly2.Explode().Count;  //记录爆炸后，线段有多少
            for (int i = 0; i < hnumst2; i++)
            {
                htype2[i] = hatchpoly2.Explode()[i].Type.ToString();    //将所有的元素记录成一个数组
                if (htype2[i] == "Line")
                {
                    hline2[i] = (Line)hatchpoly2.Explode()[i];
                }
                if (htype2[i] == "Arc")
                {
                    harc2[i] = (Arc)hatchpoly2.Explode()[i];
                }
            }
            fun.hatchsub1(dxf, htype2, hnumst2, 45, 10, hline2, harc2, hatching);

            LwPolyline hatchpoly3 = new LwPolyline();
            hatchpoly3.Vertexes.Add(new LwPolylineVertex(v20));
            hatchpoly3.Vertexes.Add(new LwPolylineVertex(v27));
            hatchpoly3.Vertexes.Add(new LwPolylineVertex(v26));
            hatchpoly3.Vertexes.Add(new LwPolylineVertex(v23));
            hatchpoly3.Vertexes.Add(new LwPolylineVertex(v22));
            hatchpoly3.Vertexes.Add(new LwPolylineVertex(v21));
            hatchpoly3.Vertexes.Add(new LwPolylineVertex(v20));
            hatchpoly3.IsClosed = true;
            String[] htype3 = new String[100];
            Line[] hline3 = new Line[100];
            Arc[] harc3 = new Arc[100];
            int hnumst3 = hatchpoly3.Explode().Count;  //记录爆炸后，线段有多少
            for (int i = 0; i < hnumst3; i++)
            {
                htype3[i] = hatchpoly3.Explode()[i].Type.ToString();    //将所有的元素记录成一个数组
                if (htype3[i] == "Line")
                {
                    hline3[i] = (Line)hatchpoly3.Explode()[i];
                }
                if (htype3[i] == "Arc")
                {
                    harc3[i] = (Arc)hatchpoly3.Explode()[i];
                }
            }
            fun.hatchsub1(dxf, htype3, hnumst3, 45, 10, hline3, harc3, hatching);



            //标注

            double height = 2;
            double arrowsize = 1;
            double exline = 2;




            fun.dimrot1(dxf, v14, v20, 90, a / 2, 1, height, arrowsize, exline, "a=" + a, "", "");

            fun.dimrot1(dxf, v27, v28, 90, a, 1, height, arrowsize, exline, "c=" + c, "", "");

            fun.dimrot1(dxf, v74, v42, 90, a * 3 / 2, 1, height, arrowsize, exline, "b=" + b, "", "");

            fun.dimrot1(dxf, v4, v9, 90, a * 2, 1, height, arrowsize, exline, "D1=", "", "");

            fun.dimrot1(dxf, v9, v50, 90, a * 3 / 2, 1, height, arrowsize, exline, "d2=" + d2, "", "");

            fun.dimrot1(dxf, v25, v22, -90, a, 1, height, arrowsize, exline, "b=" + b, "", "");

            fun.dimrot1(dxf, v19, v18, -90, a * 3 / 2, 1, height, arrowsize, exline, "d5=" + d5, "", "");

            fun.dimrot1(dxf, v32, v36, -90, a * 2, 1, height, arrowsize, exline, "D=" + D, "", "");

            fun.dimrot1(dxf, v4, v12, 0, a * 3 / 2, 1, height, arrowsize, exline, "d1=" + d1, "", "");

            fun.dimrot1(dxf, v4, v32, 0, a * 3 / 2, 1, height, arrowsize, exline, "H=" + H, "", "");

            fun.dimrot1(dxf, v3, new Vector2 (v15.X ,v3.Y ), 0, 5, 1, height, arrowsize, exline, "d3=" + d3, "", "");

            fun.dimrot1(dxf, v75, v76, -90, D / 2 + 10, 1, height, arrowsize, exline, "e=" + e, "", "");

            fun.dimrot1(dxf, v67, v68, 180, a * 3 / 2, 1, height, arrowsize, exline, "d6=" + d6, "", "");

            fun.jdbz1(dxf, new Line(v32, fun.Polar(v32, 90 * pi / 180, 0.1)), new Line(v32, fun.Polar(v32, (kr + 90) * pi / 180, 0.1)), 20, "kr", 1);

            fun.jdbz1(dxf, new Line(v53, fun.Polar(v53, 90 * pi / 180, 0.1)), new Line(v53, fun.Polar(v53, 45 * pi / 180, 0.1)), D / 2 + 6, "45°", 1);

            fun.jdbz1(dxf, new Line(v53, fun.Polar(v53, 90 * pi / 180, 0.1)), new Line(v53, fun.Polar(v53, 135 * pi / 180, 0.1)), D / 2 + 6, "45°", 1);





            //定义格式，路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);


        }

    }
}
